package cn.jobstart.controller;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;
import cn.jobstart.pubInter.exception.SkException;
import cn.jobstart.pubInter.IBaseService;
import cn.jobstart.pubInter.RestfulController;
import cn.jobstart.dto.CompanyJobDTO;
import cn.jobstart.dto.CompanyJobPageDTO;
import cn.jobstart.modelExt.CompanyJobExt;
import cn.jobstart.searchExt.CompanyJobSearchExt;
import cn.jobstart.service.ICompanyJobService;
import cn.jobstart.vo.CompanyJobDetailVO;
import cn.jobstart.vo.CompanyJobListVO;
import cn.jobstart.vo.CompanyJobDomainVO;
import cn.jobstart.vo.CompanyJobDetailDomainVO;
import cn.jobstart.export.CompanyJobDomainExport;
import cn.jobstart.controller.ApiManageController;
import org.springframework.validation.annotation.Validated;
import java.util.Set;
import java.util.HashSet;
import cn.jobstart.pubInter.exception.BusinessException;

/**
*    @author sunke
*    @Date 2023-09-06 15:00:20
*    @description CompanyJobController      企业职位
*/
@Api(tags = "人才管理系统-企业职位相关", description = "企业职位相关接口")
@RestController(value ="companyJobRestfulController")
@RequestMapping("/companyJob/")
@Validated
public class CompanyJobController extends ApiManageController<CompanyJobDTO,CompanyJobPageDTO,CompanyJobExt, CompanyJobSearchExt,CompanyJobDomainVO,CompanyJobDetailDomainVO,CompanyJobDetailVO,CompanyJobListVO,String> {

	@Resource(name = "companyJobService")
	private ICompanyJobService companyJobService;



	@Override
	public IBaseService<CompanyJobExt, CompanyJobSearchExt,String> getBaseService() throws SkException {
		return companyJobService;
	}

	@Override
	public String getBaseRoute() {
		return "/companyJob/";
	}

	/**
	* 当前模板名称
	* @return
	*/
	@Override
	public String getModelName(){
		return "企业职位";
	}

	@Override
	public Class exportExcelClass() {
		return CompanyJobDomainExport.class;
	}

	@Override
	public Set<String> totalMapSet() {
		Set totalMapSet=new HashSet();
		totalMapSet.add("count(company_job.cj_id) as countNum");
		return totalMapSet;
	}


}